<template>
  <div class="dashboard-container">
    <ad-dashboard />
    <div v-if="hasPermission('stat:data')">
      <stat-data />
    </div>
    <div v-if="hasPermission('stat:login')">
      <stat-login />
    </div>
  </div>
  <div class="footer">
    <p>Copyright 2024-现在 织码团队</p>
  </div>
</template>
<script setup>
  import StatLogin from './StatLogin.vue'
  import StatData from './StatData.vue'
  import AdDashboard from './AdDashboard.vue'
  import { hasPermission } from '@/utils/permission.js'
</script>
<style lang="scss" scoped>
  .dashboard-container {
    padding: 5px;
    height: 100%;
  }

  .footer {
    text-align: center;
    color: #999;
    font-size: 12px;
    font-weight: 300;
  }
</style>
